package com.avic.rong.utils;

import android.view.View;
import android.view.View.OnClickListener;

public abstract class OnClickLimitListener implements OnClickListener {

	boolean isAllClicked = true;

	public void onClick(View v) {
		if (isAllClicked) {
			isAllClicked = false;
			onClickLimit(v);
			new Thread(new Runnable() {
				public void run() {
					try {
						Thread.sleep(1000);
					} catch (InterruptedException e) {
						e.printStackTrace();
						isAllClicked = true;
					}
					isAllClicked = true;
				}
			}).start();
			return;
		}
	}

	public abstract void onClickLimit(View v);

}
